export enum logTypeEnum {
  CREATE = 'create',
  DELETE = 'delete',
  UPDATE = 'update',
}

export const logTypeMap = {
  [logTypeEnum.CREATE]: '创建',
  [logTypeEnum.DELETE]: '删除',
  [logTypeEnum.UPDATE]: '修改',
};

export const logTypeOptions = Object.entries(logTypeMap).map(([key, value]) => ({ label: value, value: key }));

export enum logModuleEnum {
  APP_CONNECTION = 'app_connection',
  ORG_CONNECTION = 'org_connection',
  MODEL = 'model',
  USER = 'user',
  ROLE = 'role',
  CERT_TEMPLATE = 'certificate_template',
  ENCRYPT = 'encrypt',
  TASK = 'task',
}

export const logModuleMap = {
  [logModuleEnum.APP_CONNECTION]: '应用互联',
  [logModuleEnum.ORG_CONNECTION]: '企业互联',
  [logModuleEnum.MODEL]: '模型管理',
  [logModuleEnum.USER]: '用户管理',
  [logModuleEnum.ROLE]: '角色管理',
  [logModuleEnum.CERT_TEMPLATE]: '授权书模版',
  [logModuleEnum.ENCRYPT]: '密钥管理',
  [logModuleEnum.TASK]: '任务管理',
};

export const logModuleOptions = Object.entries(logModuleMap).map(([key, value]) => ({ label: value, value: key }));